<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>您的邮箱</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<link rel="stylesheet" href="css/basic.css" />
	<link rel="stylesheet" href="css/form.css" />
	<link rel="stylesheet" href="css/ico.css" />
	<script src="js/jq1.10.2.js"></script>
	<script src="js/jquery.cookie.js"></script>
	<script src="js/check_form.js"></script>
	<script src="js/plugin.js"></script>
</head>

<body style="padding:0;">
	<header style="position: static; opacity: 1;">
	<div id="header-wrap" data-mn=0>
		<a href="index.html" data-type="ico" id="shut" class="left ico-m ico-error ico-red ico-pl">关闭</a>
		<h2>****支付机构</h2>
	</div>
	</header>
	<div id="main-wrap">
		<div class="" id="">
		<ul class="label-list c-right">
			<li class="">
				<label>支付：</label>
				<div class="ll-cont"><span id="recharge"></span>元</div>
			</li>
		</ul>
		<div class="tips">
			<div class="t-info">验证银行预留手机号</div>
			<div class="t-error"></div>
		</div>
		<ul class="form-list">
			<li class="ico-m ico-pl ico-mobile" data-type="ico">
				<div class="fl-cont form-input">
					<input id="id_input" type="number" class="preset" placeholder="请输入银行预留手机号" />
				</div>
			</li>
			<li class="ico-m ico-pl ico-mail" data-type="ico">
				<div class="fl-cont form-input f-right-btn">
					<input id="yzm" type="number" placeholder="短信验证码" />
					<a href="###" id="yzm_btn" class="btn b-blue">获取验证码</a>
				</div>
			</li>
		</ul>
		<div class="">
			<a href="index.html" data-link="edit-bcard-3" class="btn b-red"><span id="check">绑定</span></a>
		</div>
		<ul class="label-list">
			<li class="">
				<label>银行卡号：</label>
				<div class="ll-cont"><span id="info_card"></span></div>
			</li>
			<li class="">
				<label>所属银行：</label>
				<div class="ll-cont"><span id="info_bank">中国工商银行借记卡</span></div>
			</li>
			<li class="">
				<label>持卡人：</label>
				<div class="ll-cont"><span id="info_name"></span></div>
			</li>
			<li class="">
				<label>身份证号：</label>
				<div class="ll-cont"><span id="info_id"></span></div>
			</li>
		</ul>
		<div class="feed-info">
			<h2>关于首次支付</h2>
			<p></p>
			<h2>如有疑问，请咨询...</h2>
			客服电话：400-105-8851<br />
			微信客服：wuyifugui(公众号)
		</div>
	</div>
	</div>
	
	<script>
	$(function(){
		ico()
		var from = $.cookie("recharge_bind")//跳转来自哪里？“1”来自首次充值，“undefined”来自主动绑卡
		var name = $.cookie("name_show")
		var id = $.cookie("id_show")
		var card = $.cookie("cb_temp")
		var moblie = $.cookie("user_id")
		var rech = Number($.cookie("recharge_temp")).toFixed(2);
		var recharge_temp = Number($.cookie("recharge_temp"));
		$("#info_name").text(name)
		$("#info_id").text(id)
		$("#info_card").text(card);
		$("#id_input").val(moblie);
		$("#recharge").text(rech);
		$("#shut").on("click",function(){
			$.cookie("bank_mobile","",{expires: -1})
			$.cookie("cb_temp","",{expires: -1})
			$.cookie("id_temp","",{expires: -1})
			$.cookie("yzm","",{expires: -1})
			$.cookie("recharge_bind","",{expires: -1})
			if(from == "1"){
				$.cookie("back_load","recharge")
			}else{
				$.cookie("back_load","edit-bcard")
			}
		})
		$("#yzm_btn").on("click",function(){
			yzm()
		})
		$("#check").on("click",function(){
			var yzm = $("#yzm").val();
			var id_input = $("#id_input").val();
			var id_temp = $.cookie("id_temp");
			var yzm_code = $.cookie("yzm")
			if(id_input !== id_temp && id_temp !== undefined){
				$(".t-error").text("无效手机号").fadeIn()
				$(".t-info").hide()
				reset_tip()
				return false
			}else if(yzm !== yzm_code){
				$(".t-error").text("无效短信验证码").fadeIn()
				$(".t-info").hide()
				reset_tip()
				return false
			}else{
				var bc = $.cookie("cb_temp")
				var balance = $.cookie("balance");
				var bc_show = bc.match(/^\d{4}/)+"********"+bc.match(/\w{4}$/)
				var bc_show_2 = "尾号"+bc.match(/\w{4}$/)
				$.cookie("bc_show",bc_show)
				$.cookie("bc_show_2",bc_show_2)
				$("#set_bc").text(bc_show)
				if(from == "1"){
					$.cookie("back_load","recharge-2")
				}else{
					$.cookie("back_load","edit-bcard-3")
				}
				$.cookie("bcard",bc);
				$.cookie("bc_show",bc_show);
				$.cookie("bank_mobile","",{expires: -1})
				$.cookie("cb_temp","",{expires: -1})
				$.cookie("id_temp","",{expires: -1})
				$.cookie("yzm","",{expires: -1})
				$.cookie("recharge_bind","",{expires: -1})
				if(balance == undefined){
					$.cookie("balance",recharge_temp)
				}else{
					$.cookie("balance",Number(recharge_temp)+Number(balance))
				}
			}
		})
	})
	</script>	
</body>

</html>
